<!DOCTYPE html><html lang="zh-CN">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
    <title>ggplot2</title>
    <meta name="author" content="xie.guigang@gcmodeller.org" />
    <meta name="copyright" content="SMRUCC genomics Copyright (c) 2022" />
    <meta name="keywords" content="R#; ggplot2; ggplot" />
    <meta name="generator" content="https://github.com/rsharp-lang" />
    <meta name="theme-color" content="#333" />
    <meta name="description" content="Create Elegant Data Visualisations Using the Grammar of Graphics..." />
    <meta class="foundation-data-attribute-namespace" />
    <meta class="foundation-mq-xxlarge" />
    <meta class="foundation-mq-xlarge" />
    <meta class="foundation-mq-large" />
    <meta class="foundation-mq-medium" />
    <meta class="foundation-mq-small" />
    <meta class="foundation-mq-topbar" />
    <style>

.table-three-line {
border-collapse:collapse; /* 关键属性：合并表格内外边框(其实表格边框有2px，外面1px，里面还有1px哦) */
border:solid #000000; /* 设置边框属性；样式(solid=实线)、颜色(#999=灰) */
border-width:2px 0 2px 0px; /* 设置边框状粗细：上 右 下 左 = 对应：1px 0 0 1px */
}
.left-1{
    border:solid #000000;border-width:1px 1px 2px 0px;padding:2px;
    font-weight:bolder;
}
.right-1{
    border:solid #000000;border-width:1px 0px 2px 1px;padding:2px;
    font-weight:bolder;
}
.mid-1{
    border:solid #000000;border-width:1px 1px 2px 1px;padding:2px;
    font-weight:bolder;
}
.left{
    border:solid #000000;border-width:1px 1px 1px 0px;padding:2px;
}
.right{
    border:solid #000000;border-width:1px 0px 1px 1px;padding:2px;
}
.mid{
    border:solid #000000;border-width:1px 1px 1px 1px;padding:2px;
}
table caption {font-size:14px;font-weight:bolder;}
</style>
  </head>
  <body>
    <table width="100%" summary="page for {ggplot2}">
      <tbody>
        <tr>
          <td>{ggplot2}</td>
          <td style="text-align: right;">R# Documentation</td>
        </tr>
      </tbody>
    </table>
    <h1>ggplot2</h1>
    <hr />
    <p style="     font-size: 1.125em;     line-height: .8em;     margin-left: 0.5%;     background-color: #fbfbfb;     padding: 24px; ">
      <code>
        <span style="color: blue;">require</span>(<span style="color: black; font-weight: bold;">ggplot</span>);
                               <br /><br /><span style="color: green;">#' Create Elegant Data Visualisations Using the Grammar of Graphics</span><br /><span style="color: blue;">imports</span><span style="color: brown"> "ggplot2"</span><span style="color: blue;"> from</span><span style="color: brown"> "ggplot"</span>;
                           </code>
    </p>
    <p><p>Create Elegant Data Visualisations Using the Grammar of Graphics</p></p>
    <blockquote>
      <p style="font-style: italic; font-size: 0.9em;">
                           
                           </p>
    </blockquote>
    <div id="main-wrapper">
      <table class="table-three-line" style="display: none">
        <caption>.NET clr type export</caption>
        <tbody></tbody>
      </table>
      <br />
      <br />
      <table class="table-three-line">
        <caption>.NET clr function exports</caption>
        <tbody><tr>
  <td id="ggplot">
    <a href="./ggplot2/ggplot.html">ggplot</a>
  </td>
  <td><h3>Create a new ggplot</h3>

<p><code>ggplot()</code> initializes a ggplot object. It can be used to declare 
 the input data frame for a graphic and to specify the set of 
 plot aesthetics intended to be common throughout all subsequent 
 layers unless specifically overridden.</p></td>
</tr>
<tr>
  <td id="aes">
    <a href="./ggplot2/aes.html">aes</a>
  </td>
  <td><h3>Construct aesthetic mappings</h3>

<p>Aesthetic mappings describe how variables in the data are mapped 
 to visual properties (aesthetics) of geoms. Aesthetic mappings 
 can be set in ggplot() and in individual layers.</p></td>
</tr>
<tr>
  <td id="geom_point">
    <a href="./ggplot2/geom_point.html">geom_point</a>
  </td>
  <td><h3>Scatter Points</h3>

<p>The point geom is used to create scatterplots. The scatterplot is most 
 useful for displaying the relationship between two continuous variables. 
 It can be used to compare one continuous and one categorical variable, 
 or two categorical variables, but a variation like geom_jitter(), 
 geom<em>count(), or geom</em>bin2d() is usually more appropriate. A bubblechart 
 is a scatterplot with a third variable mapped to the size of points.</p></td>
</tr>
<tr>
  <td id="geom_text">
    <a href="./ggplot2/geom_text.html">geom_text</a>
  </td>
  <td><h3>Text</h3>

<p>Text geoms are useful for labeling plots. They can be used by themselves 
 as scatterplots or in combination with other geoms, for example, for 
 labeling points or for annotating the height of bars. geom_text() adds 
 only text to the plot. geom_label() draws a rectangle behind the text, 
 making it easier to read.</p></td>
</tr>
<tr>
  <td id="geom_histogram">
    <a href="./ggplot2/geom_histogram.html">geom_histogram</a>
  </td>
  <td><h2>Histograms and frequency polygons</h2>

<p>Visualise the distribution of a single continuous variable by dividing 
 the x axis into bins and counting the number of observations in each bin. 
 Histograms (<code>geom_histogram()</code>) display the counts with bars;</p></td>
</tr>
<tr>
  <td id="geom_line">
    <a href="./ggplot2/geom_line.html">geom_line</a>
  </td>
  <td><h3>Connect observations</h3>

<p>geom_path() connects the observations in the order in which they appear in 
 the data. geom_line() connects them in order of the variable on the x axis. 
 geom_step() creates a stairstep plot, highlighting exactly when changes 
 occur. The group aesthetic determines which cases are connected together.</p></td>
</tr>
<tr>
  <td id="geom_hline">
    <a href="./ggplot2/geom_hline.html">geom_hline</a>
  </td>
  <td><h3>Reference line defined by Y intercept. Useful for annotating plots.</h3>

<p>Using the described geometry, you can insert a simple geometric 
 object into your data visualization – a line defined by a position 
 on the Y axis.</p></td>
</tr>
<tr>
  <td id="geom_vline">
    <a href="./ggplot2/geom_vline.html">geom_vline</a>
  </td>
  <td><h2>Reference lines: horizontal, vertical, and diagonal</h2>

<p>These geoms add reference lines (sometimes called rules) to a plot, 
 either horizontal, vertical, or diagonal (specified by slope and
 intercept). These are useful for annotating plots.</p></td>
</tr>
<tr>
  <td id="geom_path">
    <a href="./ggplot2/geom_path.html">geom_path</a>
  </td>
  <td><h2>Connect observations</h2>

<p>geom_path() connects the observations in the order in which they 
 appear in the data. geom_line() connects them in order of the 
 variable on the x axis. geom_step() creates a stairstep plot, highlighting 
 exactly when changes occur. The group aesthetic determines which 
 cases are connected together.</p></td>
</tr>
<tr>
  <td id="geom_convexHull">
    <a href="./ggplot2/geom_convexHull.html">geom_convexHull</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="geom_boxplot">
    <a href="./ggplot2/geom_boxplot.html">geom_boxplot</a>
  </td>
  <td><h2>A box and whiskers plot (in the style of Tukey)</h2>

<p>The boxplot compactly displays the distribution of a continuous variable. 
 It visualises five summary statistics (the median, two hinges and two 
 whiskers), and all "outlying" points individually.</p></td>
</tr>
<tr>
  <td id="geom_col">
    <a href="./ggplot2/geom_col.html">geom_col</a>
  </td>
  <td><h3>Bar charts</h3>

<p>There are two types of bar charts: geom<em>bar() and geom</em>col(). geom_bar() 
 makes the height of the bar proportional to the number of cases in each
 group (or if the weight aesthetic is supplied, the sum of the weights).
 If you want the heights of the bars to represent values in the data, use 
 geom<em>col() instead. geom</em>bar() uses stat_count() by default: it counts 
 the number of cases at each x position. geom<em>col() uses stat</em>identity():
 it leaves the data as is.</p></td>
</tr>
<tr>
  <td id="geom_bar">
    <a href="./ggplot2/geom_bar.html">geom_bar</a>
  </td>
  <td><h3>Bar charts</h3>

<p>There are two types of bar charts: geom<em>bar() and geom</em>col(). geom_bar() 
 makes the height of the bar proportional to the number of cases in each
 group (or if the weight aesthetic is supplied, the sum of the weights).
 If you want the heights of the bars to represent values in the data, use 
 geom<em>col() instead. geom</em>bar() uses stat_count() by default: it counts 
 the number of cases at each x position. geom<em>col() uses stat</em>identity():
 it leaves the data as is.</p></td>
</tr>
<tr>
  <td id="geom_barplot">
    <a href="./ggplot2/geom_barplot.html">geom_barplot</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="geom_violin">
    <a href="./ggplot2/geom_violin.html">geom_violin</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="geom_jitter">
    <a href="./ggplot2/geom_jitter.html">geom_jitter</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="geom_scatterpie">
    <a href="./ggplot2/geom_scatterpie.html">geom_scatterpie</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="geom_scatterheatmap">
    <a href="./ggplot2/geom_scatterheatmap.html">geom_scatterheatmap</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="geom_pie">
    <a href="./ggplot2/geom_pie.html">geom_pie</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="geom_raster">
    <a href="./ggplot2/geom_raster.html">geom_raster</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="geom_tile">
    <a href="./ggplot2/geom_tile.html">geom_tile</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="annotation_raster">
    <a href="./ggplot2/annotation_raster.html">annotation_raster</a>
  </td>
  <td><p>annotation_raster: Annotation: high-performance rectangular tiling
 
 This is a special version of geom_raster() optimised for static 
 annotations that are the same in every panel. These annotations 
 will not affect scales (i.e. the x and y axes will not grow to cover 
 the range of the raster, and the raster must already have its own 
 colours). This is useful for adding bitmap images.</p></td>
</tr>
<tr>
  <td id="labs">
    <a href="./ggplot2/labs.html">labs</a>
  </td>
  <td><h2>Modify axis, legend, and plot labels</h2>

<p>Good labels are critical for making your plots accessible to 
 a wider audience. Always ensure the axis and legend labels 
 display the full variable name. Use the plot title and subtitle 
 to explain the main findings. It's common to use the caption 
 to provide information about the data source. tag can be used 
 for adding identification tags to differentiate between multiple 
 plots.</p></td>
</tr>
<tr>
  <td id="stat_pvalue_manual">
    <a href="./ggplot2/stat_pvalue_manual.html">stat_pvalue_manual</a>
  </td>
  <td><p>set stats p-value for the plot</p></td>
</tr>
<tr>
  <td id="stat_compare_means">
    <a href="./ggplot2/stat_compare_means.html">stat_compare_means</a>
  </td>
  <td><p>default create anova test for compares all groups</p></td>
</tr>
<tr>
  <td id="geom_signif">
    <a href="./ggplot2/geom_signif.html">geom_signif</a>
  </td>
  <td><h2>Create significance layer</h2></td>
</tr>
<tr>
  <td id="xlab">
    <a href="./ggplot2/xlab.html">xlab</a>
  </td>
  <td><h2>Modify axis, legend, and plot labels</h2>

<p>Good labels are critical for making your plots accessible to a 
 wider audience. Always ensure the axis and legend labels display 
 the full variable name. Use the plot title and subtitle to 
 explain the main findings. It's common to use the caption to 
 provide information about the data source. tag can be used for 
 adding identification tags to differentiate between multiple 
 plots.</p></td>
</tr>
<tr>
  <td id="ylab">
    <a href="./ggplot2/ylab.html">ylab</a>
  </td>
  <td><h2>Modify axis, legend, and plot labels</h2>

<p>Good labels are critical for making your plots accessible to a 
 wider audience. Always ensure the axis and legend labels display 
 the full variable name. Use the plot title and subtitle to 
 explain the main findings. It's common to use the caption to 
 provide information about the data source. tag can be used for 
 adding identification tags to differentiate between multiple 
 plots.</p></td>
</tr>
<tr>
  <td id="coord_flip">
    <a href="./ggplot2/coord_flip.html">coord_flip</a>
  </td>
  <td><p>Swapping X- and Y-Axes</p></td>
</tr>
<tr>
  <td id="theme">
    <a href="./ggplot2/theme.html">theme</a>
  </td>
  <td><h2>Modify components of a theme</h2>

<p>Themes are a powerful way to customize the non-data components of 
 your plots: i.e. titles, labels, fonts, background, gridlines, and 
 legends. Themes can be used to give plots a consistent customized 
 look. Modify a single plot's theme using theme(); see theme_update() 
 if you want modify the active theme, to affect all subsequent plots. 
 Use the themes available in complete themes if you would like to use 
 a complete theme such as theme<em>bw(), theme</em>minimal(), and more. 
 
 Theme elements are documented together according to inheritance, read
 more about theme inheritance below.</p></td>
</tr>
<tr>
  <td id="element_blank">
    <a href="./ggplot2/element_blank.html">element_blank</a>
  </td>
  <td><p>means nothing</p></td>
</tr>
<tr>
  <td id="waiver">
    <a href="./ggplot2/waiver.html">waiver</a>
  </td>
  <td><h3>A waiver object.</h3>

<p>A waiver is a "flag" object, similar to NULL, that indicates the calling 
 function should just use the default value. It is used in certain functions 
 to distinguish between displaying nothing (NULL) and displaying a default 
 value calculated elsewhere (waiver())</p></td>
</tr>
<tr>
  <td id="element_line">
    <a href="./ggplot2/element_line.html">element_line</a>
  </td>
  <td><p>Theme element: line.</p></td>
</tr>
<tr>
  <td id="ggtitle">
    <a href="./ggplot2/ggtitle.html">ggtitle</a>
  </td>
  <td><h3>Modify axis, legend, and plot labels</h3>

<p>Good labels are critical for making your plots accessible 
 to a wider audience. Always ensure the axis and legend 
 labels display the full variable name. Use the plot title 
 and subtitle to explain the main findings. It's common to 
 use the caption to provide information about the data 
 source. tag can be used for adding identification tags to 
 differentiate between multiple plots.</p></td>
</tr>
<tr>
  <td id="scale_colour_manual">
    <a href="./ggplot2/scale_colour_manual.html">scale_colour_manual</a>
  </td>
  <td><h3>Create your own discrete scale</h3>

<p>These functions allow you to specify your own set of 
 mappings from levels in the data to aesthetic values.</p></td>
</tr>
<tr>
  <td id="scale_color_brewer">
    <a href="./ggplot2/scale_color_brewer.html">scale_color_brewer</a>
  </td>
  <td><p>Sequential, diverging and qualitative colour scales from ColorBrewer</p></td>
</tr>
<tr>
  <td id="scale_fill_manual">
    <a href="./ggplot2/scale_fill_manual.html">scale_fill_manual</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="scale_fill_distiller">
    <a href="./ggplot2/scale_fill_distiller.html">scale_fill_distiller</a>
  </td>
  <td></td>
</tr>
<tr>
  <td id="scale_x_continuous">
    <a href="./ggplot2/scale_x_continuous.html">scale_x_continuous</a>
  </td>
  <td><p>Position scales for continuous data (x & y)</p></td>
</tr>
<tr>
  <td id="scale_y_continuous">
    <a href="./ggplot2/scale_y_continuous.html">scale_y_continuous</a>
  </td>
  <td><h3>Position scales for continuous data (x & y)</h3></td>
</tr>
<tr>
  <td id="scale_y_reverse">
    <a href="./ggplot2/scale_y_reverse.html">scale_y_reverse</a>
  </td>
  <td><h3>Position scales for continuous data (x & y)</h3></td>
</tr>
<tr>
  <td id="element_text">
    <a href="./ggplot2/element_text.html">element_text</a>
  </td>
  <td><h3>Theme elements</h3>

<p>text.</p></td>
</tr>
<tr>
  <td id="element_rect">
    <a href="./ggplot2/element_rect.html">element_rect</a>
  </td>
  <td><h2>Theme elements</h2>

<p>In conjunction with the theme system, the <code>element_</code> functions
 specify the display of how non-data components of the plot are 
 drawn.
 
 borders and backgrounds.</p></td>
</tr></tbody>
      </table>
    </div>
    <hr />
    <div style="text-align: center;">[<a href="../index.html">Document Index</a>]</div>
  </body>
</html>